import request from '@/utils/request'
import qs from 'qs'
// 登录
export const login = (user = {}) => {
  return request({
    method: 'POST',
    url: '/front/user/login',
    data: qs.stringify(user)
  })
}
// 登出
export const logout = () => {
  return request({
    method: 'POST',
    url: '/front/user/logout'
  })
}
// 获取用户信息
export const getUserInfo = () => {
  return request({
    method: 'GET',
    url: '/front/user/getInfo'
  })
}
// 分页获取用户信息
export const getUserPages = data => {
  return request({
    method: 'POST',
    url: '/boss/user/getUserPages',
    data
  })
}
// 封禁用户
export const forbidUser = data => {
  return request({
    method: 'POST',
    url: '/boss/user/forbidUser',
    data
  })
}
// 解禁用户
export const enableUser = params => {
  return request({
    method: 'GET',
    url: '/boss/user/enableUser',
    params
  })
}
